import { connect } from 'react-redux'
import * as actions from '../../actions/countAction'

// 同步，默认就可以拆分出来
// const mapDispatchToProps = actions

// const mapDispatchToProps = (dispatch) => {
//   const acts = {}
//   Object.keys(actions).forEach((key) => {
//     acts[key] = actions[key](dispatch)
//   })
//   console.log(acts)
//   return acts
// }

export default connect((state) => state, mapDispatchToProps)
